home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 272_01 / blpr.doc < prev    next >
Text File  |  1987-07-08  |  2KB  |  54 lines

  1.  
  2.  
  3.         NAME
  4.                 blpr -- write a character to LPT? through BIOS 17H
  5.                 blprstat -- get LPT? status through BIOS 17H
  6.  
  7.         SYNOPSIS
  8.                 r = blpr(chr, num);
  9.                 int r;    returns status in low 8 bits
  10.                 char chr; character to write
  11.                 int num;  printer number 0-2
  12.                 r = blprstat(num);
  13.                 int r;    returns status in low 8 bits
  14.                 int num;  printer number 0-2
  15.  
  16.  
  17.         DESCRIPTION
  18.         These two assembly language routines provide very low-level
  19.         access to the LPT1 - LPT3 drivers in the ROM-BIOS.  Because
  20.         of this dependency upon the ROM-BIOS Interrupt 17H, these
  21.         routines may not work on all compatibles.  The normal DOS
  22.         channel PRN: is bypassed, as is any re-assignment of LPT?.
  23.         Normally, these routines are not used directly; rather, they
  24.         are accessed through the "pr" series subroutine calls.
  25.  
  26.         Status bits are returned as follows:  (meaning is with bit set)
  27.            bit 0 = time out
  28.            bit 1,2 are unused and should be ignored
  29.            bit 3 = I/O error
  30.            bit 4 = Printer Selected
  31.            bit 5 = Out of Paper
  32.            bit 6 = Acknowledged
  33.            bit 7 = Not Busy
  34.  
  35.  
  36.         EXAMPLE
  37.  
  38.            int i;
  39.            i = blprstat(0);     /* LPT1: is 0 */
  40.            if(!(i & 0x80)) puts("Printer is busy");
  41.            else blpr('A', 0);
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.         This function is found in SMDLx.LIB for the Datalight Compiler
  54.